package com.project.service;

import com.alibaba.fastjson.JSONObject;
import com.project.entity.EmploymentInfo;
import com.project.myBeans.EmploymentInfoDetail;

import java.util.List;

/**
 * Created by hasee on 2017/4/28.
 */
public interface EmploymentInfoService {

    EmploymentInfo findById(int id);

    int update(EmploymentInfo employmentInfo);

    int add(EmploymentInfo employmentInfo);

    int delete(int id);

    List<EmploymentInfo> findall();

    List<EmploymentInfo> findByCondition(EmploymentInfo employmentInfo);

    /**
     * author: WheelChen
     * date: 2017/7/2
     * function: 根据id查找就业信息详情
     *
     * @param id
     * @return
     */
    EmploymentInfoDetail findDetailById(Integer id) throws Exception;


    /**
     * author: WheelChen
     * date: 2017/7/19
     * function: 根据userId批量更新该用户的就业信息
     *
     * @param employmentInfo
     * @return
     */
    int updateBatchByUserId(EmploymentInfo employmentInfo);

    /**
     * author: WheelChen
     * date: 2017/8/6
     * function: 根据用户id查询有效（valid=1）的就业信息
     *
     * @param userId
     * @return
     */
    EmploymentInfo findOneByUserAndValid(Integer userId);

    /**
     * author: WheelChen
     * date: 2017/9/19
     * function: 根据学生用户表idList批量删除
     *
     * @param userIdList
     * @return
     */
    int removeBatchByStudentInfoIdList(List userIdList);



}
